#pragma once
#ifndef INPUT_H
#define INPUT_H

//XML include
#include <TXF.h>
using namespace TXF;

//window include
#include <windows.h>
#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN

//world model
#include "WorldModel.h"

//directinput
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>

#define NUMBER_OF_ACTION 7

class CInput
{
protected:

	//array that contains the control for the actions
	int m_actionMapArray[NUMBER_OF_ACTION];


public:
	enum eAction
	{
		eMoveForward,
		eMoveBackward,
		eStrafeLeft,
		eStrafeRight,
		eTurnLeftRight,
		eLookUpDown,
		eChangeCamera
	};

public:
	CInput(void);
	virtual ~CInput(void);
	virtual bool initialise(const LPDIRECTINPUT8 diObject)=0;
	virtual bool initialiseActionMapping(Element root)=0;
	virtual void doUpdate(void)=0;

	int getIndexAction(string nameAction);
};

#endif

